﻿using EkStudio.com.bean.xml.RootInterface;
using EkStudio.com.bean.xml.reflection;

namespace EkStudio.com.bean.xml.WorkFlow.Node
{
    /// <summary>
    /// 判定节点设定
    /// </summary>
    public class WflowNodeItemCondition: BillObjectInterface
    {

        private string trueNode = "";
        private string falseNode = "";
        private WflowExpressionElement condition = null;

        [Xml]
        public string TrueNode
        {
            get { return trueNode; }
            set { trueNode = value; }
        }
        [Xml]
        public string FalseNode
        {
            get { return falseNode; }
            set { falseNode = value; }
        }
        [XmlElement]
        public WflowExpressionElement Condition
        {
            get { return condition; }
            set { condition = value; }
        }


        [XmlTransient]
        public object ParentBean
        {
            get
            {
                return null;
            }
            set
            {

            }
        }

        public object Clone()
        {
            WflowNodeItemCondition clone = new WflowNodeItemCondition();
            clone.TrueNode = trueNode;
            clone.FalseNode = falseNode;
            if (condition != null) clone.Condition = condition.Clone() as WflowExpressionElement;
            return clone;
        }
    }
}